import { defineStore } from 'pinia';

export interface Workflow {
  id: string;
  name: string;
  description: string;
  steps: string[];
  status: 'active' | 'inactive';
}

export const useWorkflowsStore = defineStore('workflows', {
  state: () => ({
    workflows: [] as Workflow[],
  }),
  
  actions: {
    async fetchWorkflows(): Promise<Workflow[]> {
      // TODO: 实现从后端获取工作流列表的逻辑
      return [];
    },
    
    async createWorkflow(workflow: Omit<Workflow, 'id'>): Promise<Workflow> {
      // TODO: 实现创建工作流的逻辑
      return { ...workflow, id: Date.now().toString() };
    },
    
    async updateWorkflow(workflow: Workflow): Promise<Workflow> {
      // TODO: 实现更新工作流的逻辑
      return workflow;
    },
    
    async deleteWorkflow(id: string): Promise<void> {
      // TODO: 实现删除工作流的逻辑
    }
  }
}); 